<template>
	<view class="w-100">
		<view class="head-style bg-color flex-1">
			<view class="flex-1" :style="'height:' + statusBarHeight + 'px;'"></view>
		</view>
		
	</view>
</template>

<script>
	import {
		userInfoUrl,
	} from "@/api/index.js"
	export default {
		data() {
			return {
				userInfo: '',
				statusBarHeight:''
			}
		},
		mounted() {
			this.token = uni.getStorageSync('token')
			if (this.token != '') {
				this.getUserInfo().then(() => {
					this.generateH5Url()
				})
			}
		},
		created() {
			this.$getScreenInfo().then(res => {
				this.statusBarHeight = res.statusBarHeight + 12
			})
		},
		methods: {
			getUserInfo() {
				return new Promise((resolve, reject) => {
					this.$R.get(userInfoUrl).then(res => {
						this.userInfo = res.data
						resolve()
					}).catch(error => {
						reject(error)
					})
				})
			}
		}
	}
</script>

<style lang="scss">
</style>